This invention pertains to the capture of statistics regarding computer operations and managing the configuration of system data.
One of the tough problems in file systems, operating systems, and any other xe2x80x9cunder the coversxe2x80x9d application is allowing an easy method for capturing statistics and managing the configuration. Previous systems presented different approaches for capturing statistics and managing the configuration. For example, the Unix and Plan 9 operating systems provided special file system types to allow kernel and other system information to be viewed and manipulated as files. These file systems contained special directories that represented various parts of the operating system. By reading and writing the files in these directories, system information could be viewed and changed. This allowed the system to be monitored and configured without requiring special interfaces.
The designers of the file systems decided what would be made available and how it would be formatted. The access to the various system parameters was coded into the implementation of the file system type. While the users could look at what was provided, they were left with no easy way to extend the functionality to include other parts of the system.
The concept of using the file system and the file system APIs as a simplified method for management is a sound concept. As noted above, the first step has been taken. Systems like Unix and Plan 9 expose files that can be read and written to manipulate system parameters. The next step is to allow the administrator of a system the flexibility to create and manage the files themselves. An administrator should be able to decide what things are to be exposed and how they should look. The creation and maintenance of these management files should be as easy as the creation and management of any other file in the file system.
Accordingly, the need remains for a simple way to set up and maintain files that can be used to manage system parameters and state.
A file containing a transformation template is created. Such a file, containing a transformation template and residing on a volume designated for virtual I/O operations, is know as a virtual file. The transformation template can include multiple data streams. The transformation template instructs the system as to how the system data is to be manipulated. The transformation template is saved in the file using a standard write API by writing a special xe2x80x9cvirtual I/Oxe2x80x9d command followed by the transformation template. When a standard read or write is done on a file containing a transformation template (a virtual file), the transformation template is then accessed. The file system uses the transformation template to locate the system data and formats it according to the instructions given in the template for the active data stream. The results of the read or write operation are returned to the caller. The use of the transformation template is invisible to the caller, who sees it as a normal file system operation.
The foregoing and other features, objects, and advantages of the invention will become more readily apparent from the following detailed description, which proceeds with reference to the accompanying drawings.